package com.symbio.ishenapi.common.bean;

import java.io.Serializable;

import com.symbio.ishenapi.common.kit.MessageKit;

/**
 * JSON返回值封装
 */
public class JsonRet implements Serializable {

	private static final long serialVersionUID = 2097883534911256773L;
	
	public JsonRet() {
		this.ret = 0;
	}

	public JsonRet(Object data) {
		this.ret = 0;
		this.data = data;
	}

	public JsonRet(int code, Object... args) {
		this.ret = code;
		this.msg = String.format(MessageKit.get(code), args);
	}

	private int ret;
	private String msg;
	private Object data;

	public int getRet() {
		return ret;
	}

	public void setRet(int ret) {
		this.ret = ret;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

}
